package com.gviiii.baiduai.config.impl;

import com.gviiii.baiduai.config.AbstractConfigRegistry;
import com.gviiii.baiduai.config.ConfigType;

public class TokenConfigRegistry extends AbstractConfigRegistry<String, String> {

    public TokenConfigRegistry() {
        initConfigMap(ConfigType.TOKEN,AI_TOKEN_CONFIG_FILE);
    }

    @Override
    public String getConfig(String s) {
        return tokenConfigMap.get(s);
    }

    @Override
    public boolean addConfig(String s, String s2) {
        return tokenConfigMap.put(s,s2)!=null;
    }

    @Override
    public boolean removeConfig(String s) {
        return tokenConfigMap.remove(s)!=null;
    }

    @Override
    public boolean containConfigKey(String s) {
        return tokenConfigMap.containsKey(s);
    }

    @Override
    public boolean containConfigValue(String s) {
        return tokenConfigMap.containsValue(s);
    }

    @Override
    public boolean isEmpty() {
        return tokenConfigMap.isEmpty();
    }
}
